package web2023.team.homework_10_aop.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import web2023.team.homework_10_aop.dao.LoginInfoDao;
import web2023.team.homework_10_aop.entity.Login_info;

import java.util.List;

@Service
public class LoginInfoServiceImpl implements LoginInfoService{
    @Autowired
    private LoginInfoDao loginInfoDao;

    @Override
    public boolean insertLoginInfo(Login_info loginInfo){
        if(loginInfoDao.insertLoginInfo(loginInfo) != 0){
            return true;
        }else{
            return false;
        }
    }

    @Override
    public List<Login_info> getAllLoginInfo(){
        return loginInfoDao.allLoginInfo();
    }

}



